package cn.com.bluemoon.daps.sync.vo.syncmanage;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * @author Jarod.Kong
 * @date 2021/7/20 10:52
 */
@ApiModel(description = "同步管理表级入参")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SyncTableParam implements UserPermissionApi<String> {
    @ApiModelProperty(value = "模型id", required = true)
    @NotNull(message = "模型id不可为空")
    private String modelId;

    @ApiModelProperty(value = "任务id", required = true)
    @NotNull(message = "任务id不可为空")
    private String taskId;

    @ApiModelProperty(value = "任务表id", required = true)
    @NotNull(message = "任务表id不可为空")
    private String taskTableId;

    /**
     * @return 获取mvc传输中对应模型的id
     */
    @Override
    public String getUserPermissionKeyValue() {
        return getModelId();
    }
}
